$(function () {
  $("header h4").text("国内折扣");
  $.ajax({
    url: "http://chst.vip:1234/api/getinlanddiscount",
    success: (res) => {
      let htm = "";
      $.each(res.result, (i, item) => {
        console.log(res);
        htm += `
        <li>
        <a href="inlandproduct.html?productid=${item.productId}&title=国内折扣">
          ${item.productImg}
          <span>${item.productName}</span>
          <p class="price">${item.productPrice}</p>
          <p class="from">${item.productFrom}&nbsp| ${item.productTime}</p>
        </a>
      </li>`;
      });
      console.log(htm);
      $("ul.prolist").html(htm);
    },
  });
});
